import request from "@/request/api";

//1.风险管控单分页查询
export function getRiskControlList(data) {
  return request({
    url: "/eam-service-order/lineRisk/page",
    method: "get",
    params: data,
  });
}
//2.风险管控单-巡视点列表分页查询
export function getLinePatrolPointList(data) {
  return request({
    url: "/eam-service-order/linePatrolPoint/queryPageList",
    method: "get",
    params: data,
  });
}
//3.风险管控单-分页查询
export function getLineNoPatrolList(data) {
  return request({
    url: "/eam-service-order/lineNoPatrol/page",
    method: "get",
    params: data,
  });
}
//4.风险管控单-保存或更新
export function saveRiskControl(data) {
  return request({
    url: "/eam-service-order/lineRisk/save",
    method: "post",
    data: data,
  });
}
//5.风险管控单-作废
export function cancelRiskControl(data) {
  return request({
    url: "/eam-service-order/lineRisk/cancel",
    method: "post",
    data: data,
  });
}
//6.风险管控单-删除数据
export function deleteRiskControl(id = "") {
  return request({
    url: "/eam-service-order/lineRisk/delete",
    method: "delete",
    params: {
      id
    },
  });
}
//7.风险管控单-查询基本信息
export function queryRiskControl(id = "") {
  return request({
    url: "/eam-service-order/lineRisk",
    method: "get",
    params: {
      id
    },
  });
}
//7.风险管控单-查询详情信息
export function queryRiskControlDetail(id = "") {
  return request({
    url: "/eam-service-order/lineRisk/detail",
    method: "get",
    params: {
      id
    },
  });
}
//8.风险管控单-根据高压线路id查询塔段
export function getTreeLazy(parentId = "") {
  return request({
    url: "/eam-service-device/equipment/getLineTreeLazy",
    method: "get",
    params: {
      parentId
    },
  });
}
//9.风险管控单-根据风险子类查询风险关键字
export function getDefectList(data) {
  return request({
    url: "/eam-service-standard/riskStock/list",
    method: "get",
    params: data,
  });
}
//10.风险管控单-高压线路查询跟进部门
export function getDeptName(id = "") {
  return request({
    url: "/eam-service-device/equipment/getById",
    method: "get",
    params: {
      id
    },
  });
}
// 列表-导入文件
export function importFile(data) {
  return request({
    url: "/eam-service-order/lineRisk/import",
    method: 'post',
    data: data
  });
}
// 级别变更信息-列表查询
export function getRiskLevelList(data) {
  return request({
    url: "/eam-service-order/lineRiskLevel/page",
    method: "get",
    params: data,
  });
}
// 看护值守-列表查询
export function getGuardDutyList(data) {
  return request({
    url: "/eam-service-order/lineRiskDuty/page",
    method: "get",
    params: data,
  });
}
//风险管控单-查询跟进部门
export function queryLineFollowOrg() {
  return request({
    url: "/eam-service-system/system/org/queryLineFollowOrg",
    method: "get",
  });
}
